#include <iostream>
using namespace std;

const int N = 100010;

int n;
int a[N];   //获取输入
int res[N]; //存储答案
int tr[N];  //树状数组

int lowbit(int x)
{
    return x & -x;
}

void init()
{
    for (int i = 1; i <= n; ++i)
    {
        ++tr[i];
        int p = i + lowbit(i);
        if (p <= n)
            tr[p] += tr[i];
    }
    return;
}

void sub(int k)
{
    for (int i = k; i <= n; i += lowbit(i))
        --tr[i];
    return;
}

int sum(int x)
{
    int sum = 0;
    for (int i = x; i > 0; i -= lowbit(i))
        sum += tr[i];
    return sum;
}

int find(int k) //二分找到第k小的数
{
    int l = 1, r = n;
    while (l < r)
    {
        int mid = l + r >> 1;
        if (sum(mid) >= k)
            r = mid;
        else
            l = mid + 1;
    }
    return l;
}

int main()
{
    // freopen("cin.txt", "r", stdin);
    cin >> n;
    for (int i = 2; i <= n; ++i) //因为第一个忽略不计，所以从第二个开始
        cin >> a[i];
    init();
    for (int i = n; i >= 1; --i) //从后往前找
    {
        res[i] = find(a[i] + 1); //现在还能选的数里面，你是第a[i]+1小的
        sub(res[i]);             //然后要把由所属的这个数减去
    }
    for (int i = 1; i <= n; ++i)
        cout << res[i] << endl;
    return 0;
}